<?php
session_cache_expire(999999999);
if(!isset($_SESSION)) 
{ 
session_start(); 
} 
include '../../operations/connection.php';
$idboard = $_REQUEST['idboard'];
$newlang = $_REQUEST['newlang'];

if ($_REQUEST['newlang'] == "EN") {
	include "../../value/value_en.php";
} else if($_REQUEST['newlang'] == "VN") {
	include "../../value/value_vn.php";
}
else {
	include "../../value/value_kr.php";
}

$selectempl = mysql_query("SELECT e.IDEmployee ,e.FullName, e.CMND,e.Address,e.Position FROM employee e");
?>


<div style="border: 1px dotted silver; border-radius: 3px; padding: 10px 0 15px; width: 99%; margin-left: 5px;">
			<span class="acaption" style="padding-left: 20px"><?php echo $l_document?></span>
			<ul class="upower">
				<li><a href="#" onclick="showpower()"><?php echo $l_powerattorny?> </a></li>
				<li><a href="#" onclick="showemployment()"><?php echo $l_emplcertifi?> </a>
				</li>
			</ul>

			<div class="showhide" id="power" style="display: none;">
				<table width="100%"
					style="border: 1px solid silver; border-collapse: collapse; margin-top: 20px; background: white">
					<tr>
						<td colspan="4" class="tfirst"
							style="text-align: center; text-transform: uppercase; font-weight: bold"><?php echo $l_powerattorny?></td>
					</tr>
					<tr>
					<?php
					$row_array = array();
					$index = 0;
					while ($rowpowprin=mysql_fetch_array($selectempl)){
						$row_array[$index][0] = $rowpowprin[IDEmployee];
						$row_array[$index][1]=$rowpowprin[FullName];
						$row_array[$index][2]=$rowpowprin[CMND];
						$row_array[$index][3]=$rowpowprin[Address];
						$row_array[$index][4]=$rowpowprin[Phone];
						$index += 1;
					}?>
						<td class="tfirst" bgcolor="#e2f0fc" width="20%"><?php echo $l_principals?></td>
						<td class="tfirst" bgcolor="#edf4f7"><select id="powerprin" name="powerprin" size="1"
							style="width: 100%; font-size: 13px; height: 24px;">
							<?php foreach ($row_array as $rowprin){?>
								<option value="<?=$rowprin[0]?>" id="<?=$rowprin[0]?>"
									style="font-size: 13px;">
									<?php echo $rowprin[1]?>
								</option>
								<?php }?>
						</select>
						</td>
						<td class="tfirst" bgcolor="#e2f0fc" width="20%"><?php echo $l_assignee?></td>
						<td class="tfirst" bgcolor="#edf4f7"><select  id="powerass" name="powerass" size="1"
							 style="width: 100%; font-size: 13px; height: 24px;">
						<?php foreach ($row_array as $rowass){?>
								<option value="<?=$rowass[0]?>" id="<?=$rowass[0]?>"
									style="font-size: 13px;">
									<?php echo $rowass[1]?>
								</option>
								<?php }?>
						</select>
						</td>

					</tr>

					<tr>
						<td colspan="4" class="tfirst" style="text-align: center">
					<a href="#" onclick="onclickViewPowerAttorney(this);"><input class="btnupbg btnupload" type="button" value="View" ></a>
						</td>
					</tr>
				</table>
			</div>

			<div class="showhide" id="employee" style="display: none;">
				<table width="100%"
					style="border: 1px solid silver; border-collapse: collapse; margin-top: 20px; background: white">
					<tr>
						<td colspan="4" class="tfirst"
							style="text-align: center; text-transform: uppercase; font-weight: bold"><?php echo $l_emplcertifi?></td>
					</tr>
					<tr>
						<td class="tfirst" bgcolor="#e2f0fc" width="50%"><?php echo $l_employee?></td>


						<td class="tfirst" bgcolor="#edf4f7"><select  id="emplcertifi" name="emplcertifi" size="1"
							 style="width: 100%; font-size: 13px; height: 24px;">
								<?php foreach ($row_array as $rowempl){?>
								<option value="<?=$rowempl[0]?>" id="<?=$rowempl[0]?>"
									style="font-size: 13px;">
									<?php echo $rowempl[1]?>
								</option>
								<?php }?>
						</select>
						</td>
					</tr>
					<tr>
						<td colspan="4" class="tfirst" style="text-align: center" bgcolor="#edf4f7">
						<a href="#" onclick="onclickViewEmployeeCertificate();"><input class="btnupbg btnupload" type="button" value="<?php echo $l_View?>"></a>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<?php mysql_close($connection);?>